/* indent size: 2 */

module.exports = app => {
  const DataTypes = app.Sequelize;

  const Model = app.model.define('ad', {
    id: {
      type: DataTypes.INTEGER(11),
      allowNull: false,
      primaryKey: true,
      autoIncrement: true,
    },
    picture: {
      type: DataTypes.STRING(255),
      allowNull: true,
    },
    title: {
      type: DataTypes.STRING(60),
      allowNull: true,
    },
    position: {
      type: DataTypes.STRING(60),
      allowNull: true,
    },
    starttime: {
      type: DataTypes.DATE,
      allowNull: true,
    },
    finishtime: {
      type: DataTypes.DATE,
      allowNull: true,
    },
    number: {
      type: DataTypes.INTEGER(11),
      allowNull: true,
    },
    state: {
      type: DataTypes.INTEGER(11),
      allowNull: true,
    },
    province: {
      type: DataTypes.STRING(60),
      allowNull: true,
    },
    link: {
      type: DataTypes.STRING(255),
      allowNull: true,
    },
  }, {
    tableName: 'ad',
  });

  Model.associate = function() {

  };

  return Model;
};
